<ion-view view-title="商品列表">
    <ion-nav-buttons side="right">
        <button ng-show="!isLogin"
                class="button button-assertive"
                ng-click="loginPageShow()"
                >登录/注册
        </button>
        <button ng-show="isLogin"
                class="button button-balanced"
                ng-click="loginOut()">{{username}}登出
        </button>
    </ion-nav-buttons>
    <ion-content>
        <ion-slide-box
                does-continue="true"
                auto-play="true"
                slide-interval="5000"
                show-pager="true"
                pager-click="pagerClick(index)"
                on-slide-changed="onSlideChanger($index)"
                active-slide="1" class="lunbotu">
            <ion-slide>
                <img ng-src="{{IMAGEURL}}1.jpg">
            </ion-slide>
            <ion-slide>
                <img ng-src="{{IMAGEURL}}2.jpg">
            </ion-slide>
            <ion-slide>
                <img ng-src="{{IMAGEURL}}3.jpg">
            </ion-slide>
            <ion-slide>
                <img ng-src="{{IMAGEURL}}4.jpg">
            </ion-slide>
        </ion-slide-box>
        <!-- <button ng-click="nextPage()" class="you">></button>
        <button ng-click="previousPage()" class="zuo"><</button> -->
        <ion-list type="list-inset">
            <div ng-repeat="book in books" class="row" style="margin-bottom:10px;">
                <a class="item col item-thumbnail-left priductData" href="#/modifyContact/{{book.id}}" >
                    <img ng-src="{{IMAGEURL+book.images[0].image_name}}">
                    <h2>书名：{{book.title}}</h2>
                    <p>作者：{{book.author}}</p>
                    <h3>价格：{{book.price}}</h3>
                    <h4>日期：{{book.pudate * 1000 | date:"yyyy-MM-dd HH:mm:ss"}}</h4>
                </a>
                <div class="text-right col-3">
                    <button ng-click="addToCart(book)"
                            class="button button-outline   button-royal tianjiaCart" 
                    >添加购物车</button>
                </div>
            </div>
        </ion-list>
    </ion-content>
</ion-view>